package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.dto.ClazzDto;
import com.itheima.dto.ClazzQueryDto;
import com.itheima.pojo.Clazz;
import com.itheima.vo.ClazzVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ClazzMapper {

    Page<ClazzVo> ClazzQuery(ClazzQueryDto dto);

    void insert(ClazzDto clazz);

    @Select("select * from clazz")
    List<Clazz> Queryall();

    @Delete("delete from clazz where id = #{id}")
    void delete(Integer id);

    @Select("select * from clazz where id = #{id}")
    Clazz getById(Integer id);


    void update(ClazzDto clazz);
}
